package com.hhu.wangzb.common.exception;

public class CustomException extends RuntimeException {

    private String message;
    private Integer code;

    public CustomException() {

    }

    public CustomException(String message, Integer code) {
        setCode(code);
        setMessage(message);
    }

    public CustomException(String message) {
        setCode(500);
        setMessage(message);
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
